<template>
	<view class="" style="width: 100vw;height: 100vh" :style="{backgroundColor:((ifAi=='NoAi' )?kbackgroundColor2:' #f7f7f7')}"
	>
	<!-- {'background':kbackgroundColor2}" -->
		<hx-navbar title="收银台" v-if="ifAi=='NoAi'" :back="true" :fixed="false" :color="knavTitleColor"
			:style="{background:kbackgroundColor2}" barPlaceholder="hidden" transparent="auto"></hx-navbar>
			<hx-navbar title="收银台" v-else :back="true" :fixedWhiteStyle="true" :fixed="false" :color="kblackColor"
			barPlaceholder="hidden" transparent="auto"></hx-navbar>
		<view class="content"  :style="{color:((ifAi=='NoAi' )?knormalColor:' #000000')}">
			<view class="pay">     支付金额	 </view>
			<view class="payNum"> 	
			￥ <text  v-if="ifAi=='NoAi'">{{payNum|fp}}</text>
				<text v-else>{{payNum}}</text>
				</view>
		<view class="img_back" v-if="ifAi=='NoAi'">
			<image class="img" v-if="ktheme =='black'" src="@/static/image/bpay_succeed.png" mode="widthFix"></image>
			<image class="img" v-else src="@/static/image/zpay_succeed.png" mode="widthFix"></image>
		</view>
		<view class="img_back" v-else>
			<image class="img"  src="@/static/image/zpay_succeed.png" mode="widthFix"></image>
		</view>
		<view class="img_back" v-if="ifAi=='NoAi'"> <view class="" @click="checkOrder(1)" :class="[{'check_order_black':ktheme =='black'},{'check_order':ktheme =='purple'}]" >
	 	查看订单
	 </view></view>
		<view class="img_back" v-else>
			<view class="check_order" @click="checkGenerate()"  >
				查看生成结果
			</view>
		</view>
	
	</view>
	</view>
</template>

<script>
	import paypass from '@/components/pay_pass/pay_pass.vue'
	export default {
		data() {
			return {
				payNum:' ',
				ifAi:'NoAi',
				aiEventId:''
			}
		},
		components: {
			paypass
		},
		onPullDownRefresh() {
			setTimeout(function() {
				uni.stopPullDownRefresh()
			}, 1000)
		},
		onLoad(val) {
			this.payNum =val.payNum
			console.log("val--",val);
			if(val.ai){
				this.ifAi=val.ai
				this.aiEventId=val.aiEventId
			}
		
			
		},
		methods: {
		 checkOrder(id){
			 if(id==1){
				  uni.redirectTo({
			 	url:'/pages/user/order/order'
			 })
			 }else{
				 uni.navigateTo({
				 	url:'/pages/aipicture/mine/index'
				 })
				 
			 }
			
		 },
		 checkGenerate(){
			 uni.navigateTo({
			 	url:'/pages/aipicture/ai_create/ai_create?aiEventId='+this.aiEventId
			 })
		 },
		}
	}
</script>

<style scoped lang="scss">
	.content{
	width: 100%;
	padding: 0 40rpx;
	text-align: center;
	margin-top: 40rpx;
	}
	.pay{
	  font-weight: 400;
		font-size: 24rpx;
		line-height: 40rpx;
	
	}
	.payNum{
		font-weight: bold;
		font-size: 48rpx;
		 margin-top: 40rpx;
		line-height: 40rpx;
	}
	.check_order_black {
		margin: 30rpx auto;
	color: white;
		width: 256rpx;
		height: 80rpx;
		line-height: 80rpx;
		border: 4rpx solid transparent;
		background-clip: padding-box, border-box;
		background-origin: padding-box, border-box;
		border-radius: 40rpx;
		background-image: linear-gradient(to bottom, #000000, #0b0b0b), linear-gradient(180deg, #F5F97F, #55CC7C);
		
	}
	.check_order {		margin: 30rpx auto;
	color: #000;
		width: 256rpx;
		height: 80rpx;
		line-height: 80rpx;
		border: 4rpx solid transparent;
		background-clip: padding-box, border-box;
		background-origin: padding-box, border-box;
		border-radius: 40rpx;
		background-image: linear-gradient(to bottom, #ffffff, #ffffff), linear-gradient(0deg, #7776FF, #AE2CF1);
		
	}
	.img_back{
		margin: 50rpx auto;
		.img{
			width: 400rpx;
			margin-left: 80rpx;
		}
	}
</style>
 